package org.solrcn.segment;

public class NGramSegment {

	DataModel dataModel = new DataModel();

	public void TextSeg(String text, int minGram , int maxGram) {
		
		
		for (int i = 0, end = text.length() - minGram ; i <= end; i++) {
			System.out.format("%s,%s\n",text.substring(i, i+minGram),i);
		}

	}
	
	public static void main(String[] args) {
		String text = "中华人民共和国";
		NGramSegment ng = new NGramSegment();
		ng.TextSeg(text, 1,5);
	}
}
